import { createApp } from "vue";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";

// vant
import Vant from "vant";
import "./assets/css/vant.css";

//自定义全局样式
import "./assets/scss/app.scss";

//
import "bootstrap/dist/js/bootstrap.min.js"


const app = createApp(App);

// 添加一个可以在应用的任何组件实例中访问的全局 property
app.config.globalProperties.$statusFilters =  {
  name:(status)=>{
    if(status == 0) {
        return "准备中";
      } else if(status == 1) {
        return "售卖中";
      } else if(status == 2) {
          return "发行结束";
      }else{
        return "状态"+status;
      }
  },
  
  cls:(status)=>{
    if(status == 1) {
        return "st_pending";
      } else if(status == 2) {
          return "st_end";
      }else{
        return "st_ready";
      }
  },
  pubed:(status)=>{
    if(status == 0) {
        return "待发行";
      } else if(status == 1) {
        return "发行中";
      } else if(status == 2) {
          return "发行结束";
      }
  },
  pubedCls:(status)=>{
    if(status == 0) {
        return "pb_ready";
      } else if(status == 1) {
        return "pb_pending";
      } else if(status == 2) {
          return "pb_end";
      }
  },
};


app.use(store);
app.use(router);
app.use(Vant);
app.mount("#app");
